import 'package:flutter_base_app/utils/user/user_data.dart';

import '../generated/json/base/json_field.dart';
import '../generated/json/login_data.g.dart';

@JsonSerializable()
class LoginData {
  Token token = Token();
  UserData userInfo = UserData();

  LoginData();

  factory LoginData.fromJson(Map<String, dynamic> json) => $LoginDataFromJson(json);

  Map<String, dynamic> toJson() => $LoginDataToJson(this);
}

@JsonSerializable()
class Token {
  String accessToken = "";
  String refreshToken = "";

  Token();

  factory Token.fromJson(Map<String, dynamic> json) => $TokenFromJson(json);

  Map<String, dynamic> toJson() => $TokenToJson(this);
}
